<%@ page language="java" pageEncoding="UTF-8" %>
<%@include file="/template/top.jsp" %>
<%@ include file="/template/common/include/constant.jsp" %>

<body>
<div class="main1" style="width:480px">当前的位置:发送邮件</div>

<form method="post" action="${path}/ta/ol.x" id="editFrm" enctype="multipart/form-data">
    ${sys_searchparemeter}
    <input type="hidden" name="op" value="update"/>
    <input type="hidden" name="ol.id" value="${ol.id}"/>

    <div class="list_div" style="width:480px" id="mail_body">
        <div style="color:#F00; text-align:center">
            <c:if test='${mes != null}'>
                ${mes}
            </c:if>

        </div>
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>操作员:</td>
                <td><input id="id_useName" name="ol.useName" type="text" value="${ol.useName}" size="50"/></td>
            </tr>
            <tr>
                <td>关联用户ID:</td>
                <td><input name="ol.userId" type="text" value="${ol.userId}" size="50"/></td>
            </tr>
            <tr>
                <td>内容:</td>
                <td>
                    <textarea name="ol.doc" cols="50" rows="4">${ol.doc}</textarea>
                </td>
            </tr>
            <tr>
                <td>附件:</td>
                <td>
                    <input name="upload" type="file">
                </td>
            </tr>
        </table>
    </div>

    <div class="edit_div">
        <input type="button" onClick="sumform()" value="确定" class="btn_Submit"/>
        &nbsp;
        <input type="button" onClick="window.close()" value="关闭" class="btn_Submit"/>
    </div>


    <script type="text/javascript">
        //两个参数，一个是cookie的名子，一个是值
        function SetCookie(name, value) {
            var Days = 30; //此 cookie 将被保存 30 天
            var exp = new Date();    //new Date("December 31, 9998");
            exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
            document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
        }
        //取cookies函数
        function getCookie(name) {
            var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
            if (arr != null) return unescape(arr[2]);
            return null;
        }


        function sumform() {
            //设置cookie值
            SetCookie("useName", document.getElementById("id_useName").value);

            document.getElementById("editFrm").submit();
            document.getElementById("mail_body").innerHTML = "提交中，请等待。。。";

        }

        //读取Cookies
        document.getElementById("id_useName").value = getCookie("useName");

    </script>
</form>
</body>